package JavaSE.Class12.Demo1;

public class mySort{
    public static void mySortInt(Comparable[] comparables) {
        for (int i = 0; i < comparables.length - 1; i++) {
            for (int j = 0; j < comparables.length-1-i; j++) {
                if (comparables[j].compareTo(comparables[j+1]) > 0) {
                    Comparable temp = comparables[j];
                    comparables[j] = comparables[j+1];
                    comparables[j+1] = temp;
                }
            }
        }
    }

}
